public class J10bianli {
    public static void main(String[] args) {
        int[] arr1 = {3,5,7,8,55,22};
        for (int i = 0; i < arr1.length; i++) {
            System.out.println(arr1[i]);
        }
        // 数组长度
        //最大下标 = 长度-1
        System.out.println(arr1.length);

        System.out.println("=====");
        int[] arr2 = {3,5,7,8,55,22};
        int sum = 0;
        for (int i = 0; i < arr2.length; i++) {
            sum+=arr2[i];
        }
        System.out.println("sum = " + sum);
    }
}
